﻿@using BlazorCommunity.Admin.Pages
@inherits LayoutComponentBase
<BAdmin Menus="Menus" NavigationTitle="Element社区后台管理" EnablePermissionMenus="false" LoginPage="typeof(AdminBLogin)" CreatePage="typeof(AdminCreatePage)">
</BAdmin>



@code{

    [Inject]
    NavigationManager NavigationManager { get; set; }
    protected List<MenuModel> Menus { get; set; } = new List<MenuModel>();
    [Inject]
    public AuthenticationStateProvider AuthenticationStateProvider { get; set; }
    [Parameter]
    public RenderFragment MyCreatePage { get; set; }
    protected override void OnInitialized()
    {
        Menus.Add(new MenuModel()
        {
            Label = "用户管理",
            Icon = "el-icon-user",
            Flex = true,
            Name = "User",
            Title = "用户管理",
            Route = "/manage/user"
        }); 
        Menus.Add(new MenuModel()
        {
            Label = "角色管理",
            Icon = "el-icon-cherry",
            Flex = true,
            Name = "Role",
            Title = "角色管理",
            Route = "/manage/role"
        });
        Menus.Add(new MenuModel()
        {
            Label = "主贴管理",
            Icon = "el-icon-position",
            Flex = true,
            Name = "主贴管理",
            Title = "主贴管理",
            Route = "/manage/topic"
        });
        Menus.Add(new MenuModel()
        {
            Label = "回帖管理",
            Icon = "el-icon-position",
            Flex = true,
            Name = "回帖管理",
            Title = "回帖管理",
            Route = "/manage/reply"
        });
        Menus.Add(new MenuModel()
        {
            Label = "版本管理",
            Icon = "el-icon-cherry",
            Flex = true,
            Name = "version",
            Title = "版本管理",
            Route = "/manage/ver"
        });
        Menus.Add(new MenuModel()
        {
            Label = "Banner管理",
            Icon = "el-icon-cherry",
            Flex = true,
            Name = "Banner",
            Title = "Banner管理",
            Route = "/manage/banner"
        });

    }
}